#include "stdafx.h"
#include "CriticalSectionBaseAPI.h"

CCriticalSectionBaseAPI::CCriticalSectionBaseAPI(void)
{
	::InitializeCriticalSection(&m_sec);
}

CCriticalSectionBaseAPI::~CCriticalSectionBaseAPI(void)
{
	::DeleteCriticalSection(&m_sec);
}

int CCriticalSectionBaseAPI::Lock(void)
{
	::EnterCriticalSection(&m_sec);
	return 0;
}

int CCriticalSectionBaseAPI::Unlock(void)
{
	::LeaveCriticalSection(&m_sec);
	return 0;
}
